xm: xen-api, pass-through: create: Use vslot for hotplug_slot
authorKeir Fraser <keir.fraser@citrix.com>
Thu, 4 Jun 2009 09:41:50 +0000 (10:41 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Thu, 4 Jun 2009 09:41:50 +0000 (10:41 +0100)
Using func for hotplug_slot is not correct, although func is often
zero, previously zero meant please pick a vslot and asking xend to
pick a vslot was the only method available.

This resolves the following error when using Xen API:
$ xm create hvm.conf
...
Internal error: Timed out waiting for device model action.

Signed-off-by: Simon Horman <horms@verge.net.au>
tools/python/xen/xm/xenapi_create.py

index ae9c0326cd756884775efcaae342c0f80dac1b73..54e0cd665f77e9570cae8c5f38ee64ba459230c7 100644 (file)
@@ -539,7 +539,7 @@ class xenapi_create:
             "PPCI":
                 target_ref,
             "hotplug_slot":
-                int(pci.attributes["func"].value, 16),
+                int(pci.attributes["vslot"].value, 16),
             "options":
                 get_child_nodes_as_dict(pci,
                   "pci_opt", "key", "value")